//
//  FriendCell.m
//  唧歪
//
//  Created by ZC on 15/7/8.
//  Copyright (c) 2015年 MWJ. All rights reserved.
//

#import "FriendCell.h"


@implementation FriendCell{
    NSString *Str;
}

- (void)awakeFromNib {
    
    self.image.layer.masksToBounds = YES;
    self.image.layer.cornerRadius = self.image.bounds.size.width/2;
    
}

#pragma mark - 请求帖子列表数据
-(void)londingPath1:(NSString *)path Str1:(NSString *)string{
    NSURL *url = [NSURL URLWithString:path];
    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
    [request setHTTPMethod:@"POST"];
    NSData *data = [string dataUsingEncoding:NSUTF8StringEncoding];
    [request setHTTPBody:data];
    [NSURLConnection sendAsynchronousRequest:request queue:[[NSOperationQueue alloc] init] completionHandler:^(NSURLResponse *response, NSData *data, NSError *connectionError) {
        Str = [[NSString alloc]initWithData:data encoding:NSUTF8StringEncoding];
        [self performSelectorOnMainThread:@selector(refreshData1:) withObject:Str waitUntilDone:YES];
    }];
}

-(void)refreshData1:(NSMutableArray *)sender1{
    
    if ([Str isEqualToString:@"1"]) {
        self.image.hidden=NO;
        
    }else{
        self.image.hidden=YES;
    }

}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
